#include<bits/stdc++.h>
using namespace std;
int n;
int r[200000];
bool d[200000];
int flag=0;
int z,ans;
bool cmp(int a,int b){
    return a>b;
}
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>r[i];
    }
    sort(r+1,r+n+1,cmp);
    int rear=n;
    for(int i=n-1;i>=1;i--){
        if(r[i]>r[rear]){
            rear--;
            ans++;
        }
    }
    cout<<n-ans;
    return 0;
}
